package f_collection;

import java.util.Stack;

public class StackEx {

	public StackEx(){
		Stack<StackData> s = new Stack<StackData>();
		Stack<StackData> s2 = new Stack<StackData>();
		
		s.add(new StackData("park",10));
		s.add(new StackData("kim",20));
		
		s2.push(new StackData("park",10));
		s2.push(new StackData("kim",20));
		
//		for(StackData data : s){
//			System.out.println(data.name);
//			System.out.println(data.age);
//			System.out.println("=============");
//			
//		}
		int size = s2.size();
		for(int i= 0 ; i<size; i++){
			StackData data = s2.pop();
			System.out.println(data.irum);
			System.out.println(data.age);
			System.out.println("------------");
			
		}
		
		
		


	}
	public static void main(String[] args) {
		new StackEx();

	}

}


